home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Top 200 Programs
/
Top 200 Programs.iso
/
Bob8
/
THOMPSON
/
LIBERTY
/
PRODUCT
/
LB14W.EXE
/
DIR.BAS
< prev
next >
Wrap
BASIC Source File
|
1995-12-02
|
755b
|
36 lines
dim dir$(10,10)
files "c:\", "*.*", dir$(
qtyFiles = val(dir$(0, 0))
print qtyFiles; " files"
qtySubDirs = val(dir$(0, 1))
print qtySubDirs; " subdirectories"
print dir$(0, 2); dir$(0, 3)
if qtyFiles = 0 then [skipFiles]
for x = 1 to qtyFiles
dir$(x, 1) = right$(" " + dir$(x, 1), 9)
next x
sort dir$(, 1, qtyFiles, 1
for x = qtyFiles to 1 step -1
print left$(dir$(x, 0) + " ", 13) ; " "; dir$(x, 1); " "; dir$(x, 2)
next x
[skipFiles]
print
print "Subdirectories:"
if qtySubDirs = 0 then [skipSubDirs]
for x = qtyFiles + 1 to qtyFiles + qtySubDirs
print dir$(x, 1)
next x
[skipSubDirs]
end